package shuai7boy.vip.common;

public enum KpiTypeEnum {

	ACTIVE_USER("active_user"),
	BROWSER_ACTIVE_USER("browser_active_user"), 
	NEW_INSTALL_USER("new_install_user"),
	BROWSER_NEW_INSTALL_USER("browser_new_install_user"),
	HOURLY_ACTIVE_USER("hourly_active_user"); // 按小时统计活跃用户kpi

	public final String name;

	private KpiTypeEnum(String name) {
		this.name = name;
	}

	/**
	 * 根据名称获取Kpi维度对象
	 * 
	 * @param name
	 * @return
	 */
	public static KpiTypeEnum valueOfName(String name) {
		for (KpiTypeEnum kpi : values()) {
			if (kpi.name.equals(name)) {
				return kpi;
			}
		}

		return null;
	}

}
